package com.hyt.it.ogt.ksmonitor.statistics.enums;

import lombok.Getter;

/**
 * @author 朱振宇
 * @since 2022/11/13
 */
@Getter
public enum MonitorStatisticsTypeCode {

    EXAM_CANDIDATE_TOTAL_NUM(1, "应考人数","应考人数"),
    LOGIN_NUM(2, "登录人数","登录人数"),
    EXAM_CANDIDATE_TAKE_NUM(3, "开考人数","开考人数"),
    SUBMIT_PAPER_NUM(4, "交卷人数","交卷人数"),
    VIDEO_MARK_NUM(5, "标记人次","视频标记人次（一名考生标记多次算多次）"),
    MANUAL_REVIEW_NUM(6, "确定违纪","确定违纪人数"),
    DOUBTFUL_MANUAL_REVIEW_NUM(7, "疑似违纪","疑似违纪人数"),
    WARNING_NUM(8, "预警人次","预警人次（1名考生预警多次算多次）"),
    HANDLE_UP_NUM(9, "举手人次","举手人次（1名考生举手多次算多次）");


    private int code;
    private String msg;
    private String description;

    MonitorStatisticsTypeCode(int code, String msg, String description) {
        this.code = code;
        this.msg = msg;
        this.description = description;
    }

    public static MonitorStatisticsTypeCode findByCode(int val){
        for(MonitorStatisticsTypeCode typeEnum : MonitorStatisticsTypeCode.values()){
            if(typeEnum.getCode() == val){
                return typeEnum;
            }
        }
        return null;
    }

    public static MonitorStatisticsTypeCode[] all() {
        return values();
    }
}
